﻿using SpiderMaster.AspNet.UI;

namespace SpiderMaster.AspNet.TradingSystem.UI
{
    /// <summary> Trading Center User Control. </summary>
    [ReganSchroder(8, 10, 2009)]
    public partial class TradingCenterUserControl : SpideyUserControl
    {
        /// <summary> Gets a value indicating whether this instance is a Trading Center page.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is a Trading Center page; otherwise, <c>false</c>.
        /// </value>
        public bool IsTradingCenterPage { get { return (Page is TradingCenterPage); } }

        /// <summary> Gets a value indicating whether [user is administrator]. </summary>
        /// <value><c>true</c> if [user is administrator]; otherwise, <c>false</c>.</value>
        public bool IsAdministrator { get { return RoleManagement.IsUserInRole(Page.User.Identity.Name, PredefinedRole.GeneralAdministrator); } }
    }
}